/*
 * network.h
 *
 *  Created on: 19 févr. 2013
 *      Author: pierre
 */

#ifndef NETWORK_H_
#define NETWORK_H_
#include <stdbool.h>
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
struct nom_du_programme;
int init_network(void);
int n;
int i;
void initstruct(void);
void detruire_struct(void);
int end_network(void);
int connection(char address);
int send_data(char *data);
/*Configuration de l'user agent*/
char *user_agent_value(char *name,char *version,char *system);
int socket_open(void);
struct sockaddr_in4 ;

struct in_addr ;
struct net_errors;
struct host *adress;
struct hostent *addresse;
char *ip;
char *usr_agent;
int longueur_add_ip;
void erreur_reseau(int value);
char *name_resolv(char *ad);
char *requete_au_serveur(char *host, char *page);
bool address_ok;
typedef int SOCKET;

#endif /* NETWORK_H_ */
